/*
 * Copyright (c) 2010 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.data.gdata.v2.model.batch;

import com.google.api.data.gdata.v2.model.Feed;
import com.google.api.data.gdata.v2.model.Link;

/**
 * Type of Feed that supports Batch operations.
 *
 * @since 2.2
 * @author Nicolas Garnier
 */
public class BatchFeed extends Feed {

  /**
   * Returns the batch link of the Feed.
   * 
   * @return The batch link of the Feed or {@code null} if not found.
   */
  public String getBatchLink() {
    return Link.find(links, "http://schemas.google.com/g/2005#batch");
  }

  /**
   * Returns the feed link of the Feed.
   * 
   * @return The feed link of the Feed or {@code null} if not found.
   */
  public String getFeedLink() {
    return Link.find(links, "http://schemas.google.com/g/2005#feed");
  }

  /**
   * Returns the post link of the Feed.
   * 
   * @return The post link of the Feed or {@code null} if not found.
   */
  public String getPostLink() {
    return Link.find(links, "http://schemas.google.com/g/2005#posts");
  }

}
